﻿<%@ Page Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="Report.aspx.cs"
    Inherits="HiViLicenseManage.Report" Title="Báo cáo thông tin đại lý" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderBody" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>

    <script type="text/javascript">
    $(document).ready(function () {
        $("#<%=txtDFrom.ClientID %>").dynDateTime({
            showsTime: true,
            ifFormat: "%d/%m/%Y",
            daFormat: "%l;%M %p, %e %m,  %Y",
            align: "BR",
            electric: false,
            singleClick: false,
            displayArea: ".siblings('.dtcDisplayArea')",
            button: ".next()"
        });
        
    });
        $(document).ready(function () {
        $("#<%=txtDTo.ClientID %>").dynDateTime({
            showsTime: true,
            ifFormat: "%d/%m/%Y",
            daFormat: "%l;%M %p, %e %m,  %Y",
            align: "BR",
            electric: false,
            singleClick: false,
            displayArea: ".siblings('.dtcDisplayArea')",
            button: ".next()"
        });
        
    });
    </script>

    <div style="width: 15%; float: left; margin-top: 5px;">
        Từ ngày</div>
    <div style="width: 85%; float: left; margin-top: 5px;">
        <asp:TextBox ID="txtDFrom" runat="server" Width="180px"></asp:TextBox>
        <img src="images/calender.png" />
    </div>
    <br />
    <div style="width: 15%; float: left; margin-top: 5px;">
        Đến ngày</div>
    <div style="width: 85%; float: left; margin-top: 5px;">
        <asp:TextBox ID="txtDTo" runat="server" Width="180px"></asp:TextBox>
        <img src="images/calender.png" />
    </div>
    <br />
    <div style="width: 15%; float: left; margin-top: 5px;">
        Tài khoản</div>
    <div style="width: 85%; float: left; margin-top: 5px;">
        <asp:TextBox ID="txtAgent" runat="server" Width="180px"></asp:TextBox>
    </div>
    <br />
    <div style="width: 15%; float: left; margin-top: 5px;">
    </div>
    <div style="width: 85%; float: left; margin-top: 5px;">
    </div>
    <br />
    <div style="width: 100%; text-align: center; margin-top: 5px;">
        <asp:Button ID="btnOk" runat="server" Text="Xử lý" OnClick="btnOk_Click" />
    </div>
    <br />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div style="width: 100%; float: right; margin-top: 5px;">
                <asp:GridView ID="gdvReport" runat="server" BackColor="White" BorderColor="#DEDFDE"
                    BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Both"
                    AutoGenerateColumns="False" Width="100%" PageIndex="0" AllowPaging="True" OnPageIndexChanging="gdvReport_PageIndexChanging"
                    PageSize="2" Font-Size="8pt">
                    <RowStyle BackColor="#F7F7DE" />
                    <Columns>
                        <asp:TemplateField HeaderText="Tài khoản">
                            <ItemTemplate>
                                <asp:LinkButton ID="btnLink" runat="server" Text='<%# Bind("FK_AgentID") %>'></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="Tài khoản" DataField="FK_AgentID" />
                        <asp:BoundField HeaderText="Họ tên" DataField="AgentName" />
                        <asp:BoundField HeaderText="Phần mềm" DataField="SoftwareName" />
                        <asp:BoundField HeaderText="Số key" DataField="NumberKey" DataFormatString="{0:#,#}"
                            ItemStyle-HorizontalAlign="Right" />
                    </Columns>
                    <PagerStyle HorizontalAlign="Right" CssClass="GridPager" />
                    <FooterStyle BackColor="#CCCC99" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnOk" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
